package router

import (
	"framework-server/api/v1"
	"framework-server/middleware"
	"github.com/gin-gonic/gin"
)

func InitButtonRouter(Router *gin.RouterGroup) {
	ApiRouter := Router.Group("sysButton").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
	{
		ApiRouter.GET("getSysButtonList", v1.GetSysButtonList)   // 获取系统按钮
		ApiRouter.GET("findSysButton", v1.FindSysButton)   // 获取系统按钮详情
		ApiRouter.POST("createSysButton", v1.CreateSysButton)   // 创建系统按钮
		ApiRouter.PUT("updateSysButton", v1.UpdateSysButton)   // 更新系统按钮信息
		ApiRouter.DELETE("deleteSysButton", v1.DeleteSysButton)   // 更新系统按钮信息

		ApiRouter.POST("getAllButtons", v1.GetAllButtons)   // 获取角色对应的全量按钮
		ApiRouter.POST("getButtonByAutorityId", v1.GetButtonByAutorityId)   // 获取角色已有的按钮
		ApiRouter.POST("addButtonAuthority", v1.AddButtonAuthority)   // 更新角色已有的按钮



	}
}
